import mx.transitions.Tween;
import mx.transitions.easing.*;
// Back, Bounce, Elastic, Regular, Strong, None

function launch()
{
}

function move(target:MovieClip, type:String, offset:Number, response:Object, param:Object)
{
	var tweenIns=new Tween(target, type, None.easeNone, target[type], target[type]+offset, 3, true);
	tweenIns.onMotionFinished=function()
	{
		response.invokeMotionFinished(param);
	}
}

function locate(target:MovieClip, px:Number, py:Number)
{
	new Tween(target, "_x", Bounce.easeOut, target._x, px, 3, true);
	new Tween(target, "_y", Bounce.easeOut, target._y, py, 3, true);
}

function moves(target:MovieClip, typeArr:Array, offsetArr:Array)
{
	for (var i=0; i<typeArr.length; i++)
	{
		move(target, typeArr[i], offsetArr[i]);
	}
}